package com.summatech.gwt.mvp.client.presenter;

import com.mvp4g.client.annotation.Presenter;
import com.summatech.gwt.mvp.client.MultiPresentersEventBus;
import com.summatech.gwt.mvp.client.presenter.ReceiverPresenter.IReceiverView;
import com.summatech.gwt.mvp.client.view.ReceiverView;

@Presenter(view = ReceiverView.class, multiple = true)
public class ReceiverPresenter extends
		AbstractGroupPresenter<IReceiverView, MultiPresentersEventBus> {

	public interface IReceiverView {
		void showGroup(String group);

		void setReceivedValue(String value);
	}

	public void bind() {
		view.showGroup(getGroup());
	}

	
	public void onSetSelectedItem(String group, String value) {
		// No more IF statement at this level
		view.setReceivedValue(value);
	}
}
